package com.sxj.corejava.code07_面向对象.多态;

/**
 * @author 石小俊
 * @date 2025年01月07日
 */
public class Dog extends Pet {
    private int age;

    public void show() {
        System.out.println("这是一只宠物狗,姓名:" + getName() + ",性别:" + getGender() + ",年龄:" + age);
    }

    public Dog(String name, String gender, int age) {
        super(name, gender);
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
